<?php
defined( '_JEXEC' ) or die( 'Restricted access' );
jimport( 'joomla.application.component.view' );

class BPNewsViewNews extends JView
{
	function display( $tpl = null )
	{
		global $option, $mainframe;
		$model = &$this->getModel();
		$user =& JFactory::getUser();
		$news = $model->getNews();
		$pathway =& $mainframe->getPathWay();
		$backlink = JRoute::_('index.php?option=' . $option . '&view=all' );
		$news->created = JHTML::Date($news->created );
		
		$pathway->addItem( $news->title, '');
		$this->assignRef('news', $news);
		$this->assignRef('backlink', $backlink );
		$this->assignRef( 'option', $option );
		$this->assignRef( 'name', $user );
		parent::display( $tpl );
	}
}
?>